﻿using CommonLib;
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using YouErYuanModels;

namespace YouErYuanBLL
{
   public class TongZhiBLL
    {
        public int Insert(SchoolNews schoolNews)
        {
            string sql = "insert into T_Notification values (newid(),@title,@contentWZ,@source,getdate(),@schoolid,@coverImgURL)";
            SqlParameter[] parameter = new SqlParameter[] {new SqlParameter("@title",schoolNews.title),
                                                           new SqlParameter("@contentWZ",schoolNews.contentWZ),
                                                           new SqlParameter("@source",schoolNews.source),
                                                           new SqlParameter("@coverImgURL",schoolNews.headImgURL),
                                                           new SqlParameter("@schoolid",schoolNews.shcoolID)

            };
            return SQLHepler.ExecuteSql(sql, parameter);
        }
    }
}
